package com.cloud.quickcore.admin.controller;

import com.cloud.quickcommon.R;
import com.cloud.quickcore.admin.dto.PermissionDto;
import com.cloud.quickcore.admin.service.SysPermissionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 菜单资源--Controller
 *
 * @author NiJo_H
 * @version 1.0
 * @date 2019/8/13 20:51
 */
@Api(tags = "后台-菜单(权限)管理")
@RestController
@RequestMapping("/admin/permission")
@Slf4j
public class SysPermissionController {

    @Autowired
    private SysPermissionService permissionService;

    @ApiOperation(value = "添加菜单资源")
    @PostMapping
    public R<Void> addPermission(@RequestBody PermissionDto dto) {
        permissionService.save(dto);
        return R.ok();
    }



}
